package com.chapter.sample.redis.controller;

import com.chapter.sample.redis.answer.HyperLogLogService;
import jakarta.annotation.PostConstruct;
import lombok.extern.slf4j.Slf4j;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.data.redis.core.RedisTemplate;
import org.springframework.stereotype.Component;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

import java.util.Random;
import java.util.concurrent.TimeUnit;

@RestController
@Slf4j
public class HyperLogLogController {
    @Autowired
    private HyperLogLogService hyperLogLogService;

    @RequestMapping("/uv")
    public Long uv() {
        return hyperLogLogService.uv();
    }
}
